﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class ShowLeaguerInfo : System.Web.UI.Page
{
    Operation operation = new Operation();
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = Request.QueryString["id"].ToString();
        //DataSet ds = operation.SelectLeaguerInfo(id);
        try
        {
            DataSet lmds = operation.SelectNoteById(id);
            lmTitle.Text = lmds.Tables[0].Rows[0][1].ToString();
            lmMan.Text = lmds.Tables[0].Rows[0][3].ToString();
            lmTel.Text = lmds.Tables[0].Rows[0][4].ToString();
            lmMail.Text = lmds.Tables[0].Rows[0][5].ToString();
            lmTime.Text = lmds.Tables[0].Rows[0][7].ToString();
            if (lmds.Tables[0].Rows[0][6].ToString().Equals("False"))
            {
                operation.UpdateNodeReadState(id, true);
            }
            txtInfo.Text = lmds.Tables[0].Rows[0][2].ToString();
            DataSet ds = operation.SelectPublicInfoById(Convert.ToInt32(lmds.Tables[0].Rows[0][8]), true);
            if (ds.Tables[0].Rows.Count <= 0)
            {
                txtTitle.Text = "对应的信息已被删除";
            }
            else
            {
                txtType.Text = ds.Tables[0].Rows[0][1].ToString();
                txtTitle.Text = ds.Tables[0].Rows[0][2].ToString();
                if (ds.Tables[0].Rows[0][9].ToString().CompareTo("0") != 0)
                {
                    txtType.Text = txtType.Text + "--" +
                        operation.SelectCategoryByID(ds.Tables[0].Rows[0][9].ToString()).Tables[0].Rows[0][1].ToString();
                }
            }
        }
        catch (Exception ex) { }
    }
}
